<template>
  <view class="inline-flex m-0.5">
    <input :value="curValue"  @input="handleInput"/>
  </view>
</template>

<script setup lang="ts">

import {computed} from "vue";

const props = defineProps({
  value: {
    type:[Number,String],
    default:''
  }
})

const emits = defineEmits(['update:value','input'])

const curValue = computed(
    {
      get: () => props.value,
      set: (val) => emits('update:value', val)
    }
)
const handleInput=(e:any)=>{
  curValue.value=e.detail.value
  emits('input',e.detail.value)
}

</script>

<style scoped>

</style>